package view;

import java.awt.*;

import javax.swing.*;
import javax.swing.event.*;

/**
 * 
 * @author Estelle && Marie
 *
 * This class allows to initialize a progressbar.
 * We use an object of this class in the class MainWindow 
 * 
 */

public class ProgressBar extends JProgressBar implements ChangeListener {
	
	private static final long serialVersionUID = -5343892618332473590L;


public ProgressBar() 
    {
    
    new JProgressBar(0,99);
    setString("Progression");
    setStringPainted(true);
    addChangeListener(this);
    setBackground(Color.CYAN);
    
    }

  	public void stateChanged(ChangeEvent e) 
    {
	  setString ("Progression: " + (int)(this.getPercentComplete()*100) + "%");
    }
 
  
  }